import {createRouter, createWebHistory} from 'vue-router';
import Login from '../views/Login.vue';
import Dashboard from '../views/Dashboard.vue';
import Index from '../views/Index.vue';
import Password from '../views/Password.vue';
import SaleChance from '../views/0/SaleChance.vue';
import CusDevPlan from '../views/0/CusDevPlan.vue';
import OrderDetails from '../views/0/OrderDetails.vue';
import Customer from '../views/1/Customer.vue';
import CustomerLoss from '../views/1/CustomerLoss.vue';
import CustomerReprieve from '../views/1/CustomerReprieve.vue';
import CustomerOrder from '../views/1/CustomerOrder.vue';
import ServeNew from '../views/2/ServeNew.vue';
import ServeAssign from '../views/2/ServeAssign.vue';
import ServeProcess from '../views/2/ServeProcess.vue';
import ServeFeedback from '../views/2/ServeFeedback.vue';
import ServeFile from '../views/2/ServeFile.vue';
import ReportContribute from '../views/3/ReportContribute.vue';
import ReportConstitute from '../views/3/ReportConstitute.vue';
import ReportServe from '../views/3/ReportServe.vue';
import ReportLoss from '../views/3/ReportLoss.vue';
import DataDic from '../views/4/DataDic.vue';
import User from '../views/4/User.vue';
import Role from '../views/4/Role.vue';
import Module from '../views/4/Module.vue';
import Test1 from '../views/5/Test1.vue';
import Test2 from '../views/5/Test2.vue';
import component from 'element-plus/es/components/tree-select/src/tree-select-option.mjs';


const routes = [
    {path: '/', redirect: '/login'},
    {path: '/login', name: 'Login', component: Login},
    {
        path: '/dashboard', name: 'Dashboard', component: Dashboard, children: [
            {path: 'index', name: 'Index', component: Index},
            {path: 'password', name: 'Password', component: Password},

            {path: 'sale_chance', name: 'SaleChance', component: SaleChance},
            {path: 'cus_dev_plan', name: 'CusDevPlan', component: CusDevPlan},
            {path: 'order_details', name:'OrderDetails', component: OrderDetails},

            {path: 'customer', name: 'Customer', component: Customer},
            {path: 'customer_loss', name: 'CustomerLoss', component: CustomerLoss},
            {path: 'customer_reprieve', name: 'CustomerReprieve', component: CustomerReprieve},
            {path: 'customer_order', name: 'CustomerOrder', component: CustomerOrder},

            {path: 'serve_new', name: 'ServeNew', component: ServeNew},
            {path: 'serve_assign', name: 'ServeAssign', component: ServeAssign},
            {path: 'serve_process', name: 'ServeProcess', component: ServeProcess},
            {path: 'serve_feedback', name: 'ServeFeedback', component: ServeFeedback},
            {path: 'serve_file', name: 'ServeFile', component: ServeFile},

            {path: 'report_contribute', name: 'ReportContribute', component: ReportContribute},
            {path: 'report_constitute', name: 'ReportConstitute', component: ReportConstitute},
            {path: 'report_serve', name: 'ReportServe', component: ReportServe},
            {path: 'report_loss', name: 'ReportLoss', component: ReportLoss},


            {path: 'data_dic', name: 'DataDic', component: DataDic},
            {path: 'user', name: 'User', component: User},
            {path: 'role', name: 'Role', component: Role},
            {path: 'module', name: 'Module', component: Module},

            {path: 'test1', name: 'Test1', component: Test1},
            {path: 'test2', name: 'Test2', component: Test2},
        ],
    },
];

const router = createRouter({
    history: createWebHistory(import.meta.env.BASE_URL),
    routes,
});

export default router;
